package com.demo.androidgame.samgukji_hit;

import com.demo.androidgame.fx.DynamicGameObject;

public class S_Arrow extends DynamicGameObject{

	public static final float Arrow_WIDTH = 70;
    public static final float Arrow_HEIGHT = 30;
	
    public static final int STATE_NON_ARROW = 0;
    public static final int STATE_ARROW_FIRE_LEFT = 1;
    public static final int STATE_ARROW_FIRE_RIGHT = 2;
    
    public static final float ARROW_MOVE_VELOCITY = 5;
    
    int state;
    float stateTime;
	public S_Arrow(float x, float y) {
		super(x, y, Arrow_WIDTH, Arrow_HEIGHT);
		state = STATE_NON_ARROW;
		stateTime = 0;
	}
	
	public void update(float deltaTime) {
//		velocity.add(ARROW_MOVE_VELOCITY * deltaTime, 0f);
//        position.add(velocity.x * deltaTime, velocity.y);
        bounds.lowerLeft.set(position).sub(bounds.width / 2, bounds.height / 2);
        stateTime += deltaTime;
	}

	public void leftFire() {
		state = STATE_ARROW_FIRE_LEFT;
		stateTime = 0;
	}
	public void rightFire() {
		state = STATE_ARROW_FIRE_RIGHT;
		stateTime = 0;
	}
	
}
